﻿Imports System.Windows.Data
Imports System
Imports System.Windows.Browser


Public Class TitleUrlConverter
    Implements IValueConverter

    'Note: handles binding of menu items to allow for page navigation
    Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert

        Return New Uri(String.Format("/Page/{0}", HttpUtility.UrlEncode(value.ToString())), UriKind.Relative)

    End Function

    Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack

    End Function
End Class
